package com.nextbus.transit;

import java.util.TimeZone;

public class TransitSystem {
    public static final double BOSTON_LAT = 42.358333299999998D;
    public static final double BOSTON_LON = -71.060277799999994D;
    public static final int BOSTON_LAT_INT = 42358333;
    public static final int BOSTON_LON_INT = -71060277;
    
    //--------------------------操作类型-----------------------------------
    public static final int OPERATION_TYPE_RESUME_LAST_RUN_STATE = 0;
    public static final int OPERATION_TYPE_SEARCH_ROUTE = 1;
    public static final int OPERATION_TYPE_CHANGE_VIEWMODE = 2;
    public static final int OPERATION_TYPE_UPDATE_INSTANT = 3;
    public static final int OPERATION_TYPE_PRESS_BUS = 4;
    public static final int OPERATION_TYPE_PRESS_STOP = 5;
    public static final int OPERATION_TYPE_CURRENT_LOCATION = 6;
    public static final int OPERATION_TYPE_ADD_FAVORITE_STOP = 7;
    public static final int OPERATION_TYPE_DELETE_FAVORITE_STOP = 8;
    public static final int OPERATION_TYPE_GET_FAVORITE_STOPS = 9;
    
    public static final int OPERATION_TYPE_INITDB = 111;
    
    private static final TimeZone bostonTimeZone = TimeZone.getTimeZone("America/Boston");

    //-------------------------------请求服务url-----------------------------
    public static final String AGENCY = "mbta";
    public static final String URL_BUS_PREDICTION= "http://webservices.nextbus.com/service/publicXMLFeed?command=vehicleLocations&a=" + AGENCY + "&r=";
    public static final String URL_BUS_PREDICTION_TIME="&t=0";
    public static final String URL_STOP_PREDICTION = "";

    //    public static final String U
    public static TimeZone getTimeZone()
    {
        return bostonTimeZone;
    }
    
    public static long currentTimeMillis()
    {
        long now = System.currentTimeMillis();
        return now + getTimeZone().getOffset(now);
    }

    
}
